import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import ElementUI from 'element-ui';
import './styles/element-variables.scss'; // Ensure this path is correct
import { getDarkMode } from './utils/theme';

import './assets/main.css'
// 全局路由守卫
import './router/permission';
Vue.config.productionTip = false;

Vue.use(ElementUI, { size: 'large' });

// Initialize dark mode from localStorage
const isDarkMode = getDarkMode() === 'true';
if (isDarkMode) {
  document.documentElement.classList.add('dark-mode');
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
